<template>
  <div>
    <template v-if="to">
      <router-link :to="to">
        <slot></slot>
      </router-link>
      <span>{{ separator }}</span>
    </template>

    <template v-else>
      <slot></slot>
      <span>{{ separator }}</span>
    </template>
  </div>
</template>

<script>
export default {
  name: 'BreadItem',
  props:{
    to:[String,Object]
  },
  inject:['separator'],
  data () {
    return {

    }
  },
  created () {

  },
  computed: {
  },
  methods: {
  }
}
</script>
<style lang='scss'  scoped>
span{
  margin: 0 10px;
}
</style>
